package org.hyn.gateway.authorization;

import org.apache.shiro.authc.AuthenticationToken;

/**
 * @author hyn
 * @version 1.0
 * @description 验证token
 * @date 2025/3/15
 */
public class GatewayAuthorizingToken implements AuthenticationToken {

    private static final long serialVersionUID = 1L;

    /**
     * 通道管道ID
     */
    private String uId;

    /**
     * JSON WEB TOKEN
     */
    private String jwt;

    public GatewayAuthorizingToken() {}

    public GatewayAuthorizingToken(String uId, String jwt) {
        this.uId = uId;
        this.jwt = jwt;
    }

    @Override
    public Object getPrincipal() {
        return uId;
    }

    @Override
    public Object getCredentials() {
        return jwt;
    }

    public String getJwt() {
        return jwt;
    }

    public void setJwt(String jwt) {
        this.jwt = jwt;
    }
}
